Optimal. Leaf size=46 \[ \frac {x}{8}+\frac {\cos (a+b x) \sin (a+b x)}{8 b}-\frac {\cos ^3(a+b x) \sin (a+b x)}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2648, 2715, 8}
\begin {gather*} -\frac {\sin (a+b x) \cos ^3(a+b x)}{4 b}+\frac {\sin (a+b x) \cos (a+b x)}{8 b}+\frac {x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2648
Rule 2715
Rubi steps
\begin {align*} \int \cos ^2(a+b x) \sin ^2(a+b x) \, dx &=-\frac {\cos ^3(a+b x) \sin (a+b x)}{4 b}+\frac {1}{4} \int \cos ^2(a+b x) \, dx\\ &=\frac {\cos (a+b x) \sin (a+b x)}{8 b}-\frac {\cos ^3(a+b x) \sin (a+b x)}{4 b}+\frac {\int 1 \, dx}{8}\\ &=\frac {x}{8}+\frac {\cos (a+b x) \sin (a+b x)}{8 b}-\frac {\cos ^3(a+b x) \sin (a+b x)}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 23, normalized size = 0.50 \begin {gather*} -\frac {-4 (a+b x)+\sin (4 (a+b x))}{32 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 43, normalized size = 0.93
method | result | size |
risch | \(\frac {x}{8}-\frac {\sin \left (4 b x +4 a \right )}{32 b}\) | \(19\) |
derivativedivides | \(\frac {-\frac {\left (\cos ^{3}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{4}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{8}+\frac {b x}{8}+\frac {a}{8}}{b}\) | \(43\) |
default | \(\frac {-\frac {\left (\cos ^{3}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{4}+\frac {\cos \left (b x +a \right ) \sin \left (b x +a \right )}{8}+\frac {b x}{8}+\frac {a}{8}}{b}\) | \(43\) |
norman | \(\frac {\frac {x}{8}-\frac {\tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{4 b}+\frac {7 \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b}-\frac {7 \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b}+\frac {\tan ^{7}\left (\frac {b x}{2}+\frac {a}{2}\right )}{4 b}+\frac {x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2}+\frac {3 x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4}+\frac {x \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2}+\frac {x \left (\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{4}}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 24, normalized size = 0.52 \begin {gather*} \frac {4 \, b x + 4 \, a - \sin \left (4 \, b x + 4 \, a\right )}{32 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 36, normalized size = 0.78 \begin {gather*} \frac {b x - {\left (2 \, \cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{8 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 92 vs.
\(2 (37) = 74\).
time = 0.17, size = 92, normalized size = 2.00 \begin {gather*} \begin {cases} \frac {x \sin ^{4}{\left (a + b x \right )}}{8} + \frac {x \sin ^{2}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{4} + \frac {x \cos ^{4}{\left (a + b x \right )}}{8} + \frac {\sin ^{3}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{8 b} - \frac {\sin {\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{8 b} & \text {for}\: b \neq 0 \\x \sin ^{2}{\left (a \right )} \cos ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.53, size = 18, normalized size = 0.39 \begin {gather*} \frac {1}{8} \, x - \frac {\sin \left (4 \, b x + 4 \, a\right )}{32 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.46, size = 50, normalized size = 1.09 \begin {gather*} \frac {x}{8}-\frac {\frac {\mathrm {tan}\left (a+b\,x\right )}{8}-\frac {{\mathrm {tan}\left (a+b\,x\right )}^3}{8}}{b\,\left ({\mathrm {tan}\left (a+b\,x\right )}^4+2\,{\mathrm {tan}\left (a+b\,x\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________